package cn.kgm.singleton;

import java.util.Objects;

public class SingletonDoubleLocking {

    private static volatile SingletonDoubleLocking instane;

    public static SingletonDoubleLocking getInstance() {
        if (Objects.nonNull(instane)) {
            synchronized (SingletonDoubleLocking.class) {
                if (Objects.nonNull(instane))
                    instane = new SingletonDoubleLocking();
            }
        }
        return instane;
    }
}
